Civilcad V5 File Format


This information has been gained by examination of Civilcad V5 (.AS5) files, that is, by experimentation. There does not appear to be any official or un-official published technical description of the file format.

Overview
The file is an ASCII file which contains the Layers, Points, Lines and Text from a Civilcad job. It does not appear to contain all the information in a Cvilcad job. Some job attributes will be lost when the job is written to a .AS5 file, examples would be the job plot scale and layers which are not currently displayed

The file is laid out in sections, Version, Layers, Points, Lines and Text:

[VERSION]
A0.0

[LAYERS]
L=BASE,SC=0.000,P1=0,P2=0,T=8192
L=FRED,SC=0.000,P1=0,P2=0,T=8192

[POINTS]
ID=1,X=17.62748,Y=80.62992,Z=100.00000,C=
L=BASE,P=15,S=0,XS=0.00,YS=0.00,R=5400,T=0


[LINES]
ID=4,STR=0,P1=3,P2=5
L=BASE,P=15,S=4,XS=1.00,YS=1.00,T=512


[ARCS]
ID=1,STR=0,P1=4,P2=4
P3=3,BRG=90.00000,RAD=13.21347
L=BASE,P=15,S=0,XS=1.00,YS=1.00,T=64


[TEXT]
TX=Text1
P=15,F=1,ST=7,TY=1
X=10.38762,Y=91.49606,R=0.00000
L=BASE,XO=0.00000,YO=0.00000

Version
The Version does not appear to be used, it always seems to be 0.0, the program does not even write a Version section.

Layers
Char Value Meaning
L= layer_name layer names are limited to 10 characters in length
SC= 0.0 Not sure what this means, 0.0 seems to work ok.
P1= 0 Not sure what this means, 0 seems to work ok.
P2= 0 Not sure what this means, 0 seems to work ok.
T= 8192 Means that the layer is 'on'. If this values is set to 0, they layers are turned off by default when loaded into Civilcad
[LAYERS]
L=BASE,SC=0.000,P1=0,P2=0,T=8192
Points
Char Value Meaning
L= layer_name layer names are limited to 10 characters in length
ID= 1 Point number
X= 17.627 Easting
Y= 80.629 Northing
Z= 100.000 Height
C= ABC Code value, alphanumeric, not sure of length limit. The code can have embedded spaces
L= BASE Layer name
P= 0-15 Pen number, Colour = Standard 16 DOS colours, see the following table for colours
S= n Symbol number. See the table below for the symbol numbers.
XS= 0.0 Symbol scale factor, usually 0.0. If this is > 0.0 the symbol is scaled by this factor in the X axis of the symbol.
YS= 0.0 Symbol scale factor, usually 0.0. If this is > 0.0 the symbol is scaled by this factor in the Y axis of the symbol.
R= n Rotation of the Symbol in minutes. Normal rotation is 90 degrees (5400 mins). Direction?
T= n Symbol status - bit pattern:
Bit 0 = 0/1
Bit 1 = 0/2
Bit 2 = 0/4
Bit 3 = 0/8
Bit 4 = 0/160=Non contourable, 16 = Contourable
Bit 5 = 0/32
Bit 6 = 0/64
Bit 7 = 0/128
[POINTS]
ID=1,X=17.62748,Y=80.62992,Z=100.00000,C=
L=BASE,P=15,S=0,XS=0.00,YS=0.00,R=5400,T=0
Lines
Lines are a series of line segments, apparently unjoined.
[LINES]
ID=4,STR=0,P1=3,P2=5
L=BASE,P=15,S=4,XS=1.00,YS=1.00,T=512
Char Value Meaning
ID= n Entity number, not really very useful, must be unique among lines
STR= ? No idea what this means, 0 seems to work
P1= n Start point number of the line segment
P2= n End point number of the line segment
L= BASE Layer name
P= n Pen number = Colour, see pen colour table below for colours
S= n Line style, see table below for lines styles
XS= 1.0 ???
YS= 1.0 ???
T= n Symbol status - bit pattern:
Bit 0 = 0/1
Bit 1 = 0/22=mark to short line table
Bit 2 = 0/4
Bit 3 = 0/8
Bit 4 = 0/1616=discontinuity/breakline
Bit 5 = 0/32
Bit 6 = 0/64
Bit 7 = 0/128
Bit 8 = 0/256
Bit 9 = 0/512512=normal line, not sure what it means.

Arcs
[ARCS]
ID=1,STR=0,P1=4,P2=4
P3=3,BRG=90.00000,RAD=13.21347
L=BASE,P=15,S=0,XS=1.00,YS=1.00,T=64
Char Value Meaning
ID= n Entity number, not really very useful, must be unique among lines
STR= ? No idea what this means, 0 seems to work
P1= n Start point number of the line segment
P2= n End point number of the line segment
P3= n Centre point of Arc
L= BASE Layer name
P= n Pen number = Colour, see pen colour table below for colours
S= n Line style, see table below for lines styles
XS= 1.0 ???
YS= 1.0 ???
T= n Symbol status - bit pattern:
Bit 0 = 0/11=discontinuity/breakline ???? not sure
Bit 1 = 0/2
Bit 2 = 0/4
Bit 3 = 0/8
Bit 4 = 0/16
Bit 5 = 0/32
Bit 6 = 0/6464=normal, not sure why??
Bit 7 = 0/128
Bit 8 = 0/256
Bit 9 = 0/512
Text
[TEXT]
TX=Text1
P=15,F=1,ST=7,TY=1
X=10.38762,Y=91.49606,R=0.00000
L=BASE,XO=0.00000,YO=0.00000
Char Value Meaning
TX= text string Text string (?? is there a length limit)
P= n Pen number = Colour, see pen colour table below for colours
F= n Font number. See table of fonts below (ignored by the program)
ST= n Justification (ignored by the program)
1 = left justify?,text above line
2 = centre justify?, text above line
3 = right justify?, text above line
4 =
5 =
6 =
7 = left justify?, text below line
8 = centre justify?, text below line
9 = right justify?, text below line
TY= n Type?? No idea what this is. Style?? (ignored by the program)
X= 10.387 Easting of the start position of the text
Y= 91.496 Northing of the start position of the text
R= 0.00 Angle of the text as a decimal degrees Cartesian angle, anticlockwise,
0.0 = Horizontal to the right
L= layer Layer Name
XO= 0.0 ?? No idea what this is. (ignored by the program)
YO= 0.0 ?? No idea what this is. (ignored by the program)
Pens - Colours
Because Civilcad has a Black screen background and draws points and lines in white by default and the program has a white background, some colours are translated for better visibility, otherwise Civilcad white points and lines (most of them) would be ‘invisible’ on a white background.
Civilcad Pen
Civilcad Pen
P=
GS Colour Civilcad Colour
0 Black Black
1 Dark Blue Dark Blue
2 Dark Green Dark Green
3 Dark Cyan Dark Cyan (Aqua)
4 Dark Red Dark Red
5 Dark Purple Dark Purple
6 Brown Brown
7 Dark Grey Dark Grey
8 Light Grey Light Grey
9 Light Blue Light Blue
10 Light Green Light Green
11 Light Cyan Light Cyan (Aqua)
12 Light Red (Pink) Light Red (Pink)
13 Light Purple Light Purple (Violet)
14 Yellow Yellow
15 White Black
Click here for GS Colour chart.
Symbols
Symbols are chosen by name in Civilcad but are written to the AS5 file as a number.
Civilcad Symbol Name GS Symbol Shape
? 0 Cross4
$CIR1 1 ?
$CIR2 2 ?
$BOX 3 ?
$FILL 4 Cross inside circle
$GAP 5 ?
$NOX 6 ?
? 7 ?
? 8 Gunsight
GRATE 9 ?
? 10 ?
? 11 ?
GATE-S- 12 Hourglass
? 13 ?
? 14 ?
? 15 ?
DRIVE 16 ?
? 17 ?
? 18 Tree
AIRV 19 ?
? 35 Gunsight
? 36 ?
CTRL 37 ?
DPY 38 ?
BDYPG 39 4 Horiz lines & cross
BM 40 ?
BORHL 41 ?
BRDAW 42 ?
ALPIN 43 ?
CONL 51 ?
CTSIG 50 ?
FLUSH 52 ?

Line Styles
Civilcad Line Style
S=
Description GS Equivalent
0 Solid 1
1 Dotted ................ 2
2 Dotted . . . . . . . . . 3
3 Dotted . . . . . . . 4
4 Dashed -- -- -- -- -- -- 4
5 Dot Dashed - . - . - . - . - 4
6 Dot Dashed -- . -- . -- . -- . -- 5
7 Dash, Dot Dot -- . . -- . . -- . . -- . -- 6
8 Solid 1
9 Solid 1
10 Solid 1
11 -- / -- / -- / -- / -- / -- 32
12 ---W---W---W---W-- 21
13 ---S---S---S---S--- 18
14 ---G---G---G---G-- 17
15 ---E---E---E---E--- 16
16 ---T---T---T---T--- 20
17 ========== 30
18 -- -- -- -- -- -- -- 7
19 TTTTTTTTTTT 34
20 EEEEEEEEEE 28
21 _i_|_i_|_i_|_i 33
22 _/_/_/_/_/_/_/_ 22
23 ---E---E---E---E--- 16
24 =========== 30
25 TTTTTTTTTTTT 34

Fonts
Note - No translation of Fonts is done on input or Output
Civilcad Description
F=
Usage details
1 Height 2.5 x 1.67 mm fixed font
2 Code 1.8 x 1.2 mm fixed font
3 Number 3.5 x 2.33 mm fixed font
4 Grid label Font 2.5 x 2.00 mm proportional
5 Area 2.5 x 2.00 mm fixed font
6 Lot No 3.5 x 3.50 mm fixed font
7 Brg Microfont 2.5 x 2.50 mm proportional
8 Dst Microfont 2.5 x 1.67 mm proportional
9 Arc Table 2.5 x 1.67 mm fixed font
10 Text String 2.5 x 1.67 mm fixed font